<template>
  <div class="table-search">
    <div class="search-form">
      <el-form label-position="top" label-width="100%" :model="formData">
        <el-form-item :label="title">
          <div class="start-text"></div>
          <el-input style="width: 25%" v-model="formData.title"></el-input>
          <el-button class="btn" type="primary" @click="search()"
            >搜索</el-button
          >
        </el-form-item>
      </el-form>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      formData: {
        title: "",
      },
    };
  },
  props: {
    title: {
      type: String,
      default: "请输入标题搜素",
    },
  },
  methods: {
    search() {
      this.$emit("inputBtn", this.formData.title);
    },
  },
};
</script>

<style lang="scss">
@import "@/assets/styles/global.scss";
.table-search {
  box-sizing: border-box;
  width: 100%;
  padding: 20px;
  .search-form {
    background-color: #ffffff;
    color: #000;
    margin-bottom: 10px;
    padding: 10px 20px;
    box-sizing: border-box;
    .btn {
      margin-left: 10px;
    }
    // @include center;
  }
}
</style>
